package com.jinxiangkeyun.checkin;

import android.app.Application;
import android.content.Context;

import org.acra.ACRA;
import org.acra.config.CoreConfigurationBuilder;
import org.acra.config.HttpSenderConfigurationBuilder;
import org.acra.data.StringFormat;


public class MyApp extends Application {
    //acra-myapp
    @Override
    public void onCreate() {
        super.onCreate();
    }

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);

        CoreConfigurationBuilder builder = new CoreConfigurationBuilder(this);
        builder.withBuildConfigClass(BuildConfig.class)
                .withReportFormat(StringFormat.JSON);
        builder.getPluginConfigurationBuilder(HttpSenderConfigurationBuilder.class)
                .withUri("http://172.16.101.52:8080/report")//这个地址是服务器的ip地址
                .withBasicAuthLogin("G36gGFXjubKxJwjO")//这个是创建项目时 web前端页面提示的账号密码  需要创建时复制粘贴
                .withBasicAuthPassword("rpdh69ec1d4xqpyJ")
                .withEnabled(true);
        ACRA.init(this, builder);

    }

}
